home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / djgpp / src / flex-238 / lexyy.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-30  |  23.5 KB  |  959 lines

  1. /* A lexical scanner generated by flex */
  2.  
  3. /* scanner skeleton version:
  4.  * $Header: /usr/fsys/odin/a/vern/flex/RCS/flex.skel,v 2.16 90/08/03 14:09:36 vern Exp $
  5.  */
  6.  
  7. #define FLEX_SCANNER
  8.  
  9. #include <stdio.h>
  10.  
  11.  
  12. /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
  13. #ifdef c_plusplus
  14. #ifndef __cplusplus
  15. #define __cplusplus
  16. #endif
  17. #endif
  18.  
  19.  
  20. #ifdef __cplusplus
  21.  
  22. #include <stdlib.h>
  23. #include <osfcn.h>
  24.  
  25. /* use prototypes in function declarations */
  26. #define YY_USE_PROTOS
  27.  
  28. /* the "const" storage-class-modifier is valid */
  29. #define YY_USE_CONST
  30.  
  31. #else    /* ! __cplusplus */
  32.  
  33. #ifdef __STDC__
  34.  
  35. #ifdef __GNUC__
  36. #include <stddef.h>
  37. void *malloc( size_t );
  38. void free( void* );
  39. #else
  40. #include <stdlib.h>
  41. #endif    /* __GNUC__ */
  42.  
  43. #define YY_USE_PROTOS
  44. #define YY_USE_CONST
  45.  
  46. #endif    /* __STDC__ */
  47. #endif    /* ! __cplusplus */
  48.  
  49.  
  50. #ifdef __TURBOC__
  51. #define YY_USE_CONST
  52. #endif
  53.  
  54.  
  55. #ifndef YY_USE_CONST
  56. #define const
  57. #endif
  58.  
  59.  
  60. #ifdef YY_USE_PROTOS
  61. #define YY_PROTO(proto) proto
  62. #else
  63. #define YY_PROTO(proto) ()
  64. /* we can't get here if it's an ANSI C compiler, or a C++ compiler,
  65.  * so it's got to be a K&R compiler, and therefore there's no standard
  66.  * place from which to include these definitions
  67.  */
  68. char *malloc();
  69. int free();
  70. int read();
  71. #endif
  72.  
  73.  
  74. /* amount of stuff to slurp up with each read */
  75. #ifndef YY_READ_BUF_SIZE
  76. #define YY_READ_BUF_SIZE 8192
  77. #endif
  78.  
  79. /* returned upon end-of-file */
  80. #define YY_END_TOK 0
  81.  
  82. /* copy whatever the last rule matched to the standard output */
  83.  
  84. /* cast to (char *) is because for 8-bit chars, yytext is (unsigned char *) */
  85. /* this used to be an fputs(), but since the string might contain NUL's,
  86.  * we now use fwrite()
  87.  */
  88. #define ECHO (void) fwrite( (char *) yytext, yyleng, 1, yyout )
  89.  
  90. /* gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  91.  * is returned in "result".
  92.  */
  93. #define YY_INPUT(buf,result,max_size) \
  94.     if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
  95.         YY_FATAL_ERROR( "read() in flex scanner failed" );
  96. #define YY_NULL 0
  97.  
  98. /* no semi-colon after return; correct usage is to write "yyterminate();" -
  99.  * we don't want an extra ';' after the "return" because that will cause
  100.  * some compilers to complain about unreachable statements.
  101.  */
  102. #define yyterminate() return ( YY_NULL )
  103.  
  104. /* report a fatal error */
  105.  
  106. /* The funky do-while is used to turn this macro definition into
  107.  * a single C statement (which needs a semi-colon terminator).
  108.  * This avoids problems with code like:
  109.  *
  110.  *     if ( something_happens )
  111.  *        YY_FATAL_ERROR( "oops, the something happened" );
  112.  *    else
  113.  *        everything_okay();
  114.  *
  115.  * Prior to using the do-while the compiler would get upset at the
  116.  * "else" because it interpreted the "if" statement as being all
  117.  * done when it reached the ';' after the YY_FATAL_ERROR() call.
  118.  */
  119.  
  120. #define YY_FATAL_ERROR(msg) \
  121.     do \
  122.         { \
  123.         (void) fputs( msg, stderr ); \
  124.         (void) putc( '\n', stderr ); \
  125.         exit( 1 ); \
  126.         } \
  127.     while ( 0 )
  128.  
  129. /* default yywrap function - always treat EOF as an EOF */
  130. #define yywrap() 1
  131.  
  132. /* enter a start condition.  This macro really ought to take a parameter,
  133.  * but we do it the disgusting crufty way forced on us by the ()-less
  134.  * definition of BEGIN
  135.  */
  136. #define BEGIN yy_start = 1 + 2 *
  137.  
  138. /* action number for EOF rule of a given start state */
  139. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  140.  
  141. /* special action meaning "start processing a new file" */
  142. #define YY_NEW_FILE \
  143.     do \
  144.         { \
  145.         yy_init_buffer( yy_current_buffer, yyin ); \
  146.         yy_load_buffer_state(); \
  147.         } \
  148.     while ( 0 )
  149.  
  150. /* default declaration of generated scanner - a define so the user can
  151.  * easily add parameters
  152.  */
  153. #define YY_DECL int yylex YY_PROTO(( void )) 
  154.  
  155. /* code executed at the end of each rule */
  156. #define YY_BREAK break;
  157.  
  158. #define YY_END_OF_BUFFER_CHAR 0
  159.  
  160. #ifndef YY_BUF_SIZE
  161. #define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of default input buffer */
  162. #endif
  163.  
  164. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  165.  
  166. #define YY_CHAR char
  167. # line 1 "<stdin>"
  168. #define INITIAL 0
  169. # line 1 "<stdin>"
  170.  
  171. /* done after the current pattern has been matched and before the
  172.  * corresponding action - sets up yytext
  173.  */
  174. #define YY_DO_BEFORE_ACTION \
  175.     yytext = yy_bp; \
  176.     yyleng = yy_cp - yy_bp; \
  177.     yy_hold_char = *yy_cp; \
  178.     *yy_cp = '\0'; \
  179.     yy_c_buf_p = yy_cp;
  180.  
  181. #define EOB_ACT_CONTINUE_SCAN 0
  182. #define EOB_ACT_END_OF_FILE 1
  183. #define EOB_ACT_LAST_MATCH 2
  184.  
  185. /* return all but the first 'n' matched characters back to the input stream */
  186. #define yyless(n) \
  187.     do \
  188.         { \
  189.         /* undo effects of setting up yytext */ \
  190.         *yy_cp = yy_hold_char; \
  191.         yy_c_buf_p = yy_cp = yy_bp + n; \
  192.         YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  193.         } \
  194.     while ( 0 )
  195.  
  196. #define unput(c) yyunput( c, yytext )
  197.  
  198.  
  199. struct yy_buffer_state
  200.     {
  201.     FILE *yy_input_file;
  202.  
  203.     YY_CHAR *yy_ch_buf;        /* input buffer */
  204.     YY_CHAR *yy_buf_pos;    /* current position in input buffer */
  205.  
  206.     /* size of input buffer in bytes, not including room for EOB characters*/
  207.     int yy_buf_size;    
  208.  
  209.     /* number of characters read into yy_ch_buf, not including EOB characters */
  210.     int yy_n_chars;
  211.  
  212.     int yy_eof_status;        /* whether we've seen an EOF on this buffer */
  213. #define EOF_NOT_SEEN 0
  214.     /* "pending" happens when the EOF has been seen but there's still
  215.      * some text process
  216.      */
  217. #define EOF_PENDING 1
  218. #define EOF_DONE 2
  219.     };
  220.  
  221. static YY_BUFFER_STATE yy_current_buffer;
  222.  
  223. /* we provide macros for accessing buffer states in case in the
  224.  * future we want to put the buffer states in a more general
  225.  * "scanner state"
  226.  */
  227. #define YY_CURRENT_BUFFER yy_current_buffer
  228.  
  229.  
  230. /* yy_hold_char holds the character lost when yytext is formed */
  231. static YY_CHAR yy_hold_char;
  232.  
  233. static int yy_n_chars;        /* number of characters read into yy_ch_buf */
  234.  
  235.  
  236.  
  237. #ifndef YY_USER_ACTION
  238. #define YY_USER_ACTION
  239. #endif
  240.  
  241. #ifndef YY_USER_INIT
  242. #define YY_USER_INIT
  243. #endif
  244.  
  245. extern YY_CHAR *yytext;
  246. extern int yyleng;
  247. extern FILE *yyin, *yyout;
  248.  
  249. YY_CHAR *yytext;
  250. int yyleng;
  251.  
  252. FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
  253.  
  254. #define YY_END_OF_BUFFER 2
  255. typedef int yy_state_type;
  256. static const short int yy_accept[6] =
  257.     {   0,
  258.         0,    0,    2,    1,    0
  259.     } ;
  260.  
  261. static const YY_CHAR yy_ec[128] =
  262.     {   0,
  263.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  264.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  265.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  266.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  267.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  268.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  269.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  270.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  271.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  272.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  273.  
  274.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  275.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  276.         1,    1,    1,    1,    1,    1,    1
  277.     } ;
  278.  
  279. static const YY_CHAR yy_meta[2] =
  280.     {   0,
  281.         1
  282.     } ;
  283.  
  284. static const short int yy_base[7] =
  285.     {   0,
  286.         0,    0,    2,    3,    3,    0
  287.     } ;
  288.  
  289. static const short int yy_def[7] =
  290.     {   0,
  291.         6,    6,    5,    5,    0,    5
  292.     } ;
  293.  
  294. static const short int yy_nxt[5] =
  295.     {   0,
  296.         4,    5,    3,    5
  297.     } ;
  298.  
  299. static const short int yy_chk[5] =
  300.     {   0,
  301.         6,    3,    5,    5
  302.     } ;
  303.  
  304. static yy_state_type yy_last_accepting_state;
  305. static YY_CHAR *yy_last_accepting_cpos;
  306.  
  307. /* the intent behind this definition is that it'll catch
  308.  * any uses of REJECT which flex missed
  309.  */
  310. #define REJECT reject_used_but_not_detected
  311. #define yymore() yymore_used_but_not_detected
  312. #define YY_MORE_ADJ 0
  313.  
  314. /* these variables are all declared out here so that section 3 code can
  315.  * manipulate them
  316.  */
  317. /* points to current character in buffer */
  318. static YY_CHAR *yy_c_buf_p = (YY_CHAR *) 0;
  319. static int yy_init = 1;        /* whether we need to initialize */
  320. static int yy_start = 0;    /* start state number */
  321.  
  322. /* flag which is used to allow yywrap()'s to do buffer switches
  323.  * instead of setting up a fresh yyin.  A bit of a hack ...
  324.  */
  325. static int yy_did_buffer_switch_on_eof;
  326.  
  327. static yy_state_type yy_get_previous_state YY_PROTO(( void ));
  328. static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
  329. static int yy_get_next_buffer YY_PROTO(( void ));
  330. static void yyunput YY_PROTO(( YY_CHAR c, YY_CHAR *buf_ptr ));
  331. void yyrestart YY_PROTO(( FILE *input_file ));
  332. void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
  333. void yy_load_buffer_state YY_PROTO(( void ));
  334. YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
  335. void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
  336. void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
  337.  
  338. #define yy_new_buffer yy_create_buffer
  339.  
  340. #ifdef __cplusplus
  341. static int yyinput YY_PROTO(( void ));
  342. #else
  343. static int input YY_PROTO(( void ));
  344. #endif
  345.  
  346. YY_DECL
  347.     {
  348.     register yy_state_type yy_current_state;
  349.     register YY_CHAR *yy_cp, *yy_bp;
  350.     register int yy_act;
  351.  
  352.  
  353.  
  354.     if ( yy_init )
  355.     {
  356.     YY_USER_INIT;
  357.  
  358.     if ( ! yy_start )
  359.         yy_start = 1;    /* first start state */
  360.  
  361.     if ( ! yyin )
  362.         yyin = stdin;
  363.  
  364.     if ( ! yyout )
  365.         yyout = stdout;
  366.  
  367.     if ( yy_current_buffer )
  368.         yy_init_buffer( yy_current_buffer, yyin );
  369.     else
  370.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
  371.  
  372.     yy_load_buffer_state();
  373.  
  374.     yy_init = 0;
  375.     }
  376.  
  377.     while ( 1 )        /* loops until end-of-file is reached */
  378.     {
  379.     yy_cp = yy_c_buf_p;
  380.  
  381.     /* support of yytext */
  382.     *yy_cp = yy_hold_char;
  383.  
  384.     /* yy_bp points to the position in yy_ch_buf of the start of the
  385.      * current run.
  386.      */
  387.     yy_bp = yy_cp;
  388.  
  389.     yy_current_state = yy_start;
  390. yy_match:
  391.     do
  392.         {
  393.         register YY_CHAR yy_c = yy_ec[*yy_cp];
  394.         if ( yy_accept[yy_current_state] )
  395.         {
  396.         yy_last_accepting_state = yy_current_state;
  397.         yy_last_accepting_cpos = yy_cp;
  398.         }
  399.         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  400.         {
  401.         yy_current_state = yy_def[yy_current_state];
  402.         if ( yy_current_state >= 6 )
  403.             yy_c = yy_meta[yy_c];
  404.         }
  405.         yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  406.         ++yy_cp;
  407.         }
  408.     while ( yy_current_state != 5 );
  409.     yy_cp = yy_last_accepting_cpos;
  410.     yy_current_state = yy_last_accepting_state;
  411.  
  412. yy_find_action:
  413.     yy_act = yy_accept[yy_current_state];
  414.  
  415.     YY_DO_BEFORE_ACTION;
  416.     YY_USER_ACTION;
  417.  
  418. do_action:    /* this label is used only to access EOF actions */
  419.  
  420.  
  421.     switch ( yy_act )
  422.         {
  423.         case 0: /* must backtrack */
  424.         /* undo the effects of YY_DO_BEFORE_ACTION */
  425.         *yy_cp = yy_hold_char;
  426.         yy_cp = yy_last_accepting_cpos;
  427.         yy_current_state = yy_last_accepting_state;
  428.         goto yy_find_action;
  429.  
  430. case 1:
  431. # line 2 "<stdin>"
  432. ECHO;
  433.     YY_BREAK
  434. case YY_STATE_EOF(INITIAL):
  435.     yyterminate();
  436.  
  437.         case YY_END_OF_BUFFER:
  438.         {
  439.         /* amount of text matched not including the EOB char */
  440.         int yy_amount_of_matched_text = yy_cp - yytext - 1;
  441.  
  442.         /* undo the effects of YY_DO_BEFORE_ACTION */
  443.         *yy_cp = yy_hold_char;
  444.  
  445.         /* note that here we test for yy_c_buf_p "<=" to the position
  446.          * of the first EOB in the buffer, since yy_c_buf_p will
  447.          * already have been incremented past the NUL character
  448.          * (since all states make transitions on EOB to the end-
  449.          * of-buffer state).  Contrast this with the test in yyinput().
  450.          */
  451.         if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  452.             /* this was really a NUL */
  453.             {
  454.             yy_state_type yy_next_state;
  455.  
  456.             yy_c_buf_p = yytext + yy_amount_of_matched_text;
  457.  
  458.             yy_current_state = yy_get_previous_state();
  459.  
  460.             /* okay, we're now positioned to make the
  461.              * NUL transition.  We couldn't have
  462.              * yy_get_previous_state() go ahead and do it
  463.              * for us because it doesn't know how to deal
  464.              * with the possibility of jamming (and we
  465.              * don't want to build jamming into it because
  466.              * then it will run more slowly)
  467.              */
  468.  
  469.             yy_next_state = yy_try_NUL_trans( yy_current_state );
  470.  
  471.             yy_bp = yytext + YY_MORE_ADJ;
  472.  
  473.             if ( yy_next_state )
  474.             {
  475.             /* consume the NUL */
  476.             yy_cp = ++yy_c_buf_p;
  477.             yy_current_state = yy_next_state;
  478.             goto yy_match;
  479.             }
  480.  
  481.             else
  482.             {
  483.                 yy_cp = yy_last_accepting_cpos;
  484.                 yy_current_state = yy_last_accepting_state;
  485.             goto yy_find_action;
  486.             }
  487.             }
  488.  
  489.         else switch ( yy_get_next_buffer() )
  490.             {
  491.             case EOB_ACT_END_OF_FILE:
  492.             {
  493.             yy_did_buffer_switch_on_eof = 0;
  494.  
  495.             if ( yywrap() )
  496.                 {
  497.                 /* note: because we've taken care in
  498.                  * yy_get_next_buffer() to have set up yytext,
  499.                  * we can now set up yy_c_buf_p so that if some
  500.                  * total hoser (like flex itself) wants
  501.                  * to call the scanner after we return the
  502.                  * YY_NULL, it'll still work - another YY_NULL
  503.                  * will get returned.
  504.                  */
  505.                 yy_c_buf_p = yytext + YY_MORE_ADJ;
  506.  
  507.                 yy_act = YY_STATE_EOF((yy_start - 1) / 2);
  508.                 goto do_action;
  509.                 }
  510.  
  511.             else
  512.                 {
  513.                 if ( ! yy_did_buffer_switch_on_eof )
  514.                 YY_NEW_FILE;
  515.                 }
  516.             }
  517.             break;
  518.  
  519.             case EOB_ACT_CONTINUE_SCAN:
  520.             yy_c_buf_p = yytext + yy_amount_of_matched_text;
  521.  
  522.             yy_current_state = yy_get_previous_state();
  523.  
  524.             yy_cp = yy_c_buf_p;
  525.             yy_bp = yytext + YY_MORE_ADJ;
  526.             goto yy_match;
  527.  
  528.             case EOB_ACT_LAST_MATCH:
  529.             yy_c_buf_p =
  530.                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
  531.  
  532.             yy_current_state = yy_get_previous_state();
  533.  
  534.             yy_cp = yy_c_buf_p;
  535.             yy_bp = yytext + YY_MORE_ADJ;
  536.             goto yy_find_action;
  537.             }
  538.         break;
  539.         }
  540.  
  541.         default:
  542. #ifdef FLEX_DEBUG
  543.         printf( "action # %d\n", yy_act );
  544. #endif
  545.         YY_FATAL_ERROR(
  546.             "fatal flex scanner internal error--no action found" );
  547.         }
  548.     }
  549.     }
  550.  
  551.  
  552. /* yy_get_next_buffer - try to read in a new buffer
  553.  *
  554.  * synopsis
  555.  *     int yy_get_next_buffer();
  556.  *     
  557.  * returns a code representing an action
  558.  *     EOB_ACT_LAST_MATCH - 
  559.  *     EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  560.  *     EOB_ACT_END_OF_FILE - end of file
  561.  */
  562.  
  563. static int yy_get_next_buffer()
  564.  
  565.     {
  566.     register YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
  567.     register YY_CHAR *source = yytext - 1; /* copy prev. char, too */
  568.     register int number_to_move, i;
  569.     int ret_val;
  570.  
  571.     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
  572.     YY_FATAL_ERROR(
  573.         "fatal flex scanner internal error--end of buffer missed" );
  574.  
  575.     /* try to read more data */
  576.  
  577.     /* first move last chars to start of buffer */
  578.     number_to_move = yy_c_buf_p - yytext;
  579.  
  580.     for ( i = 0; i < number_to_move; ++i )
  581.     *(dest++) = *(source++);
  582.  
  583.     if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN )
  584.     /* don't do the read, it's not guaranteed to return an EOF,
  585.      * just force an EOF
  586.      */
  587.     yy_n_chars = 0;
  588.  
  589.     else
  590.     {
  591.     int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1;
  592.  
  593.     if ( num_to_read > YY_READ_BUF_SIZE )
  594.         num_to_read = YY_READ_BUF_SIZE;
  595.  
  596.     else if ( num_to_read <= 0 )
  597.         YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" );
  598.  
  599.     /* read in more data */
  600.     YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
  601.           yy_n_chars, num_to_read );
  602.     }
  603.  
  604.     if ( yy_n_chars == 0 )
  605.     {
  606.     if ( number_to_move == 1 )
  607.         {
  608.         ret_val = EOB_ACT_END_OF_FILE;
  609.         yy_current_buffer->yy_eof_status = EOF_DONE;
  610.         }
  611.  
  612.     else
  613.         {
  614.         ret_val = EOB_ACT_LAST_MATCH;
  615.         yy_current_buffer->yy_eof_status = EOF_PENDING;
  616.         }
  617.     }
  618.  
  619.     else
  620.     ret_val = EOB_ACT_CONTINUE_SCAN;
  621.  
  622.     yy_n_chars += number_to_move;
  623.     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  624.     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  625.  
  626.     /* yytext begins at the second character in yy_ch_buf; the first
  627.      * character is the one which preceded it before reading in the latest
  628.      * buffer; it needs to be kept around in case it's a newline, so
  629.      * yy_get_previous_state() will have with '^' rules active
  630.      */
  631.  
  632.     yytext = &yy_current_buffer->yy_ch_buf[1];
  633.  
  634.     return ( ret_val );
  635.     }
  636.  
  637.  
  638. /* yy_get_previous_state - get the state just before the EOB char was reached
  639.  *
  640.  * synopsis
  641.  *     yy_state_type yy_get_previous_state();
  642.  */
  643.  
  644. static yy_state_type yy_get_previous_state()
  645.  
  646.     {
  647.     register yy_state_type yy_current_state;
  648.     register YY_CHAR *yy_cp;
  649.  
  650.     yy_current_state = yy_start;
  651.  
  652.     for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
  653.     {
  654.     register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1);
  655.     if ( yy_accept[yy_current_state] )
  656.         {
  657.         yy_last_accepting_state = yy_current_state;
  658.         yy_last_accepting_cpos = yy_cp;
  659.         }
  660.     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  661.         {
  662.         yy_current_state = yy_def[yy_current_state];
  663.         if ( yy_current_state >= 6 )
  664.         yy_c = yy_meta[yy_c];
  665.         }
  666.     yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  667.     }
  668.  
  669.     return ( yy_current_state );
  670.     }
  671.  
  672.  
  673. /* yy_try_NUL_trans - try to make a transition on the NUL character
  674.  *
  675.  * synopsis
  676.  *     next_state = yy_try_NUL_trans( current_state );
  677.  */
  678.  
  679. #ifdef YY_USE_PROTOS
  680. static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state )
  681. #else
  682. static yy_state_type yy_try_NUL_trans( yy_current_state )
  683. register yy_state_type yy_current_state;
  684. #endif
  685.  
  686.     {
  687.     register int yy_is_jam;
  688.     register YY_CHAR *yy_cp = yy_c_buf_p;
  689.  
  690.     register YY_CHAR yy_c = 1;
  691.     if ( yy_accept[yy_current_state] )
  692.     {
  693.     yy_last_accepting_state = yy_current_state;
  694.     yy_last_accepting_cpos = yy_cp;
  695.     }
  696.     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  697.     {
  698.     yy_current_state = yy_def[yy_current_state];
  699.     if ( yy_current_state >= 6 )
  700.         yy_c = yy_meta[yy_c];
  701.     }
  702.     yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  703.     yy_is_jam = (yy_current_state == 5);
  704.  
  705.     return ( yy_is_jam ? 0 : yy_current_state );
  706.     }
  707.  
  708.  
  709. #ifdef YY_USE_PROTOS
  710. static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp )
  711. #else
  712. static void yyunput( c, yy_bp )
  713. YY_CHAR c;
  714. register YY_CHAR *yy_bp;
  715. #endif
  716.  
  717.     {
  718.     register YY_CHAR *yy_cp = yy_c_buf_p;
  719.  
  720.     /* undo effects of setting up yytext */
  721.     *yy_cp = yy_hold_char;
  722.  
  723.     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  724.     { /* need to shift things up to make room */
  725.     register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
  726.     register YY_CHAR *dest =
  727.         &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2];
  728.     register YY_CHAR *source =
  729.         &yy_current_buffer->yy_ch_buf[number_to_move];
  730.  
  731.     while ( source > yy_current_buffer->yy_ch_buf )
  732.         *--dest = *--source;
  733.  
  734.     yy_cp += dest - source;
  735.     yy_bp += dest - source;
  736.     yy_n_chars = yy_current_buffer->yy_buf_size;
  737.  
  738.     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  739.         YY_FATAL_ERROR( "flex scanner push-back overflow" );
  740.     }
  741.  
  742.     if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
  743.     yy_cp[-2] = '\n';
  744.  
  745.     *--yy_cp = c;
  746.  
  747.     /* note: the formal parameter *must* be called "yy_bp" for this
  748.      *       macro to now work correctly
  749.      */
  750.     YY_DO_BEFORE_ACTION; /* set up yytext again */
  751.     }
  752.  
  753.  
  754. #ifdef __cplusplus
  755. static int yyinput()
  756. #else
  757. static int input()
  758. #endif
  759.  
  760.     {
  761.     int c;
  762.     YY_CHAR *yy_cp = yy_c_buf_p;
  763.  
  764.     *yy_cp = yy_hold_char;
  765.  
  766.     if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  767.     {
  768.     /* yy_c_buf_p now points to the character we want to return.
  769.      * If this occurs *before* the EOB characters, then it's a
  770.      * valid NUL; if not, then we've hit the end of the buffer.
  771.      */
  772.     if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  773.         /* this was really a NUL */
  774.         *yy_c_buf_p = '\0';
  775.  
  776.     else
  777.         { /* need more input */
  778.         yytext = yy_c_buf_p;
  779.         ++yy_c_buf_p;
  780.  
  781.         switch ( yy_get_next_buffer() )
  782.         {
  783.         case EOB_ACT_END_OF_FILE:
  784.             {
  785.             if ( yywrap() )
  786.             {
  787.             yy_c_buf_p = yytext + YY_MORE_ADJ;
  788.             return ( EOF );
  789.             }
  790.  
  791.             YY_NEW_FILE;
  792.  
  793. #ifdef __cplusplus
  794.             return ( yyinput() );
  795. #else
  796.             return ( input() );
  797. #endif
  798.             }
  799.             break;
  800.  
  801.         case EOB_ACT_CONTINUE_SCAN:
  802.             yy_c_buf_p = yytext + YY_MORE_ADJ;
  803.             break;
  804.  
  805.         case EOB_ACT_LAST_MATCH:
  806. #ifdef __cplusplus
  807.             YY_FATAL_ERROR( "unexpected last match in yyinput()" );
  808. #else
  809.             YY_FATAL_ERROR( "unexpected last match in input()" );
  810. #endif
  811.         }
  812.         }
  813.     }
  814.  
  815.     c = *yy_c_buf_p;
  816.     yy_hold_char = *++yy_c_buf_p;
  817.  
  818.     return ( c );
  819.     }
  820.  
  821.  
  822. #ifdef YY_USE_PROTOS
  823. void yyrestart( FILE *input_file )
  824. #else
  825. void yyrestart( input_file )
  826. FILE *input_file;
  827. #endif
  828.  
  829.     {
  830.     yy_init_buffer( yy_current_buffer, input_file );
  831.     yy_load_buffer_state();
  832.     }
  833.  
  834.  
  835. #ifdef YY_USE_PROTOS
  836. void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
  837. #else
  838. void yy_switch_to_buffer( new_buffer )
  839. YY_BUFFER_STATE new_buffer;
  840. #endif
  841.  
  842.     {
  843.     if ( yy_current_buffer == new_buffer )
  844.     return;
  845.  
  846.     if ( yy_current_buffer )
  847.     {
  848.     /* flush out information for old buffer */
  849.     *yy_c_buf_p = yy_hold_char;
  850.     yy_current_buffer->yy_buf_pos = yy_c_buf_p;
  851.     yy_current_buffer->yy_n_chars = yy_n_chars;
  852.     }
  853.  
  854.     yy_current_buffer = new_buffer;
  855.     yy_load_buffer_state();
  856.  
  857.     /* we don't actually know whether we did this switch during
  858.      * EOF (yywrap()) processing, but the only time this flag
  859.      * is looked at is after yywrap() is called, so it's safe
  860.      * to go ahead and always set it.
  861.      */
  862.     yy_did_buffer_switch_on_eof = 1;
  863.     }
  864.  
  865.  
  866. #ifdef YY_USE_PROTOS
  867. void yy_load_buffer_state( void )
  868. #else
  869. void yy_load_buffer_state()
  870. #endif
  871.  
  872.     {
  873.     yy_n_chars = yy_current_buffer->yy_n_chars;
  874.     yytext = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
  875.     yyin = yy_current_buffer->yy_input_file;
  876.     yy_hold_char = *yy_c_buf_p;
  877.     }
  878.  
  879.  
  880. #ifdef YY_USE_PROTOS
  881. YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
  882. #else
  883. YY_BUFFER_STATE yy_create_buffer( file, size )
  884. FILE *file;
  885. int size;
  886. #endif
  887.  
  888.     {
  889.     YY_BUFFER_STATE b;
  890.  
  891.     b = (YY_BUFFER_STATE) malloc( sizeof( struct yy_buffer_state ) );
  892.  
  893.     if ( ! b )
  894.     YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  895.  
  896.     b->yy_buf_size = size;
  897.  
  898.     /* yy_ch_buf has to be 2 characters longer than the size given because
  899.      * we need to put in 2 end-of-buffer characters.
  900.      */
  901.     b->yy_ch_buf = (YY_CHAR *) malloc( (unsigned) (b->yy_buf_size + 2) );
  902.  
  903.     if ( ! b->yy_ch_buf )
  904.     YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  905.  
  906.     yy_init_buffer( b, file );
  907.  
  908.     return ( b );
  909.     }
  910.  
  911.  
  912. #ifdef YY_USE_PROTOS
  913. void yy_delete_buffer( YY_BUFFER_STATE b )
  914. #else
  915. void yy_delete_buffer( b )
  916. YY_BUFFER_STATE b;
  917. #endif
  918.  
  919.     {
  920.     if ( b == yy_current_buffer )
  921.     yy_current_buffer = (YY_BUFFER_STATE) 0;
  922.  
  923.     free( (char *) b->yy_ch_buf );
  924.     free( (char *) b );
  925.     }
  926.  
  927.  
  928. #ifdef YY_USE_PROTOS
  929. void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
  930. #else
  931. void yy_init_buffer( b, file )
  932. YY_BUFFER_STATE b;
  933. FILE *file;
  934. #endif
  935.  
  936.     {
  937.     b->yy_input_file = file;
  938.  
  939.     /* we put in the '\n' and start reading from [1] so that an
  940.      * initial match-at-newline will be true.
  941.      */
  942.  
  943.     b->yy_ch_buf[0] = '\n';
  944.     b->yy_n_chars = 1;
  945.  
  946.     /* we always need two end-of-buffer characters.  The first causes
  947.      * a transition to the end-of-buffer state.  The second causes
  948.      * a jam in that state.
  949.      */
  950.     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  951.     b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
  952.  
  953.     b->yy_buf_pos = &b->yy_ch_buf[1];
  954.  
  955.     b->yy_eof_status = EOF_NOT_SEEN;
  956.     }
  957. # line 2 "<stdin>"
  958.  
  959.